Code blue, the term used in hospitals to call for an immediate cardiopulmonary resuscitation (CPR), signals dire emergencies where medical errors can occur and lives can be lost. Reviewing CPR performance of the code blue team is a cornerstone for improving outcomes. Thorough and accurate recording of code blue events enable detailed reviews to promote quality improvement and patient safety. However, currently used handwritten records on code sheets are subject to human errors and lack details for measuring key quality indicators. Here, we will develop an electronic device for complete recording of code blue events. We call this device the BlueBox. The BlueBox is a small patch to be placed on the chest when the resuscitation begins. It will capture all code blue events -- vital signs, cardiac rhythms, verbal orders and their execution, chest compressions, cardioversion/defibrillation, procedures, medications, and labs. Our goal for the BlueBox is to support staff training and hospital quality improvement, thus enhance the safety of patients undergoing CPR. We have 3 specific aims: (1) complete the engineering development of the BlueBox device; (2) implement the software user interface (UI) for the electronic code sheet; and (3) validate the BlueBox system in code blue simulations. The BlueBox device includes multiple sensors embedded on a micro-electronics platform. We will integrate all sensors-- ECGs, accelerometry, temperature, contact microphone, and voice recorder. We will prepare the firmware to enable simultaneous recording of all data, with time stamps. The enclosure will be designed to withstand pressures from chest compressions and voltages from cardioversion and defibrillation. We will develop an electronic code sheet UI to display the code blue events. An app will be developed for the iOS (iPads). The app will retrieve data from the BlueBox via Bluetooth Low Energy (BLE), then display code blue events chronologically, with time stamps. The UI will enable reviews of all recordings, voice playbacks, zooms (to 1 sec intervals), user annotations, and analysis of key CPR quality indicators. The user can export the electronic code sheet as a portable document format (pdf) file, for printing a conventional paper medical record or uploading to hospital electronic medical records (EMRs). For BlueBox validation, we will test the system in 20 mock code sessions held in the Harbor- UCLA Simulation Center. Voice recordings from BlueBox will be compared to video recordings. We will also test the BlueBox device on 6 male pigs in CPRs conducted by a 4-person code blue team. We will troubleshoot and improve the BlueBox system until >90% accuracy and not false indicators are achieved. The project is significant, because it is expected to improve medical practice and patient safety in the hospital. It represents a novel and innovative way of recording and analyzing the critical data from code blue resuscitations to support staff training and quality improvement.